<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"  
    xmlns:h="http://java.sun.com/jsf/html"  
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui"
    xmlns:jr="http://jasperreportjsf.sf.net/tld/jasperreports-jsf-1_2.tld"
    template="/plantillas/plantilla-sistema.xhtml">
    
    <ui:define name="cabecera">
        <title>Reportes</title>
        <link rel="shortcut icon"  href="../../resources/imagenes/favicon.ico" />
    </ui:define>
    
    <ui:define name="contenido">
        <center>
            <h:form id="reporteFrm">
            <p:outputPanel autoUpdate="true">
            <jr:reportFrame height="500" width="800" value="/reportes/dinamico.jasper" format="pdf"
                            rendered="#{reporteBean.consulta != null}">           
                <jr:source type="bean" value="#{reporteBean.registros}"/>
                 <f:param name="logo" value="../../resources/imagenes/muhnes.jpg" />
            </jr:reportFrame>
            </p:outputPanel>
            </h:form>
        </center>
    </ui:define>
    
    <ui:define name="extra">
        <ui:include src="/plantillas/generador-consulta.xhtml">
            <ui:param name="bean" value="#{reporteBean}" />
            <ui:param name="metodo" value="setConsulta" />
            <ui:param name="actualizacion" value=":reporteFrm" />
            <ui:param name="procesamiento" value=":reporteFrm,@this" />
            <ui:param name="ajax" value="false" />
        </ui:include>
    </ui:define>
  
    
</ui:composition>